/*
 * 描          述:  <描述>
 * 修  改   人:  PengQingyang
 * 修改时间:  2022年5月14日
 * <修改描述:>
 */
package com.tx.component.attachment.model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 附件实例<br/>
 * <功能详细描述>
 * 
 * @author  PengQingyang
 * @version  [版本号, 2022年5月14日]
 * @see  [相关类/方法]
 * @since  [产品/模块版本]
 */
@Entity
@Table(name = "fc_attachment_instance")
public class AttachmentInstance implements Serializable {
    
    /** 注释内容 */
    private static final long serialVersionUID = -5876620309888605223L;
    
    /** 文件的存储id */
    @Id
    private String id;
    
    /** 所属模块:module */
    @Column(nullable = false, updatable = false, length = 64)
    private String module;
    
    /** 所属目录 */
    @Column(nullable = false, updatable = false, length = 64)
    private String catalog;
    
    /** 相对于文件容器的相对路径 */
    @Column(nullable = false, updatable = false, length = 256)
    private String relativePath;
    
    /** 业务分类 */
    @Column(nullable = true, updatable = false, length = 64)
    private String categoryKey;
    
    /** 业务关键字 */
    @Column(nullable = true, updatable = false, length = 64)
    private String businessKey;
    
    /** 类型关键字 */
    @Column(nullable = true, updatable = false, length = 500)
    private String typeKey;
    
    /** 文件名称 */
    @Column(nullable = false, length = 64)
    private String filename;
    
    /** 文件原名称 */
    @Column(nullable = true, length = 64)
    private String originalFilename;
    
    /** 文件的后缀名 */
    @Column(nullable = true, length = 64)
    private String filenameExtension;
    
    /** 是否删除：文件的删除包含两种，一种是弱删除，及修改deleted=true,然后等待系统回收，另外一种是直接真正删除 */
    private boolean deleted = false;
    
    /** 删除时间 */
    private Date deleteDate;
    
    /** 附件实例大小 */
    private long size;
    
    /** 最后跟新时间 */
    @Column(nullable = false, length = 500)
    private Date lastUpdateDate;
    
    /** 创建时间 */
    @Column(nullable = false, updatable = false, length = 500)
    private Date createDate;
    
    /** tags */
    @Transient
    private List<AttachmentTag> tags;
    
    /** <默认构造函数> */
    public AttachmentInstance() {
        super();
    }
    
    /** <默认构造函数> */
    public AttachmentInstance(String catalog, String relativePath) {
        super();
        this.catalog = catalog;
        this.relativePath = relativePath;
    }
    
    /**
     * @return 返回 id
     */
    public String getId() {
        return id;
    }
    
    /**
     * @param 对id进行赋值
     */
    public void setId(String id) {
        this.id = id;
    }
    
    /**
     * @return 返回 module
     */
    public String getModule() {
        return module;
    }
    
    /**
     * @param 对module进行赋值
     */
    public void setModule(String module) {
        this.module = module;
    }
    
    /**
     * @return 返回 catalog
     */
    public String getCatalog() {
        return catalog;
    }
    
    /**
     * @param 对catalog进行赋值
     */
    public void setCatalog(String catalog) {
        this.catalog = catalog;
    }
    
    /**
     * @return 返回 relativePath
     */
    public String getRelativePath() {
        return relativePath;
    }
    
    /**
     * @param 对relativePath进行赋值
     */
    public void setRelativePath(String relativePath) {
        this.relativePath = relativePath;
    }
    
    /**
     * @return 返回 filename
     */
    public String getFilename() {
        return filename;
    }
    
    /**
     * @param 对filename进行赋值
     */
    public void setFilename(String filename) {
        this.filename = filename;
    }
    
    /**
     * @return 返回 originalFilename
     */
    public String getOriginalFilename() {
        return originalFilename;
    }
    
    /**
     * @param 对originalFilename进行赋值
     */
    public void setOriginalFilename(String originalFilename) {
        this.originalFilename = originalFilename;
    }
    
    /**
     * @return 返回 filenameExtension
     */
    public String getFilenameExtension() {
        return filenameExtension;
    }
    
    /**
     * @param 对filenameExtension进行赋值
     */
    public void setFilenameExtension(String filenameExtension) {
        this.filenameExtension = filenameExtension;
    }
    
    /**
     * @return 返回 categoryKey
     */
    public String getCategoryKey() {
        return categoryKey;
    }
    
    /**
     * @param 对categoryKey进行赋值
     */
    public void setCategoryKey(String categoryKey) {
        this.categoryKey = categoryKey;
    }
    
    /**
     * @return 返回 businessKey
     */
    public String getBusinessKey() {
        return businessKey;
    }
    
    /**
     * @param 对businessKey进行赋值
     */
    public void setBusinessKey(String businessKey) {
        this.businessKey = businessKey;
    }
    
    /**
     * @return 返回 typeKey
     */
    public String getTypeKey() {
        return typeKey;
    }
    
    /**
     * @param 对typeKey进行赋值
     */
    public void setTypeKey(String typeKey) {
        this.typeKey = typeKey;
    }
    
    /**
     * @return 返回 deleted
     */
    public boolean isDeleted() {
        return deleted;
    }
    
    /**
     * @param 对deleted进行赋值
     */
    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }
    
    /**
     * @return 返回 deleteDate
     */
    public Date getDeleteDate() {
        return deleteDate;
    }
    
    /**
     * @param 对deleteDate进行赋值
     */
    public void setDeleteDate(Date deleteDate) {
        this.deleteDate = deleteDate;
    }
    
    /**
     * @return 返回 lastUpdateDate
     */
    public Date getLastUpdateDate() {
        return lastUpdateDate;
    }
    
    /**
     * @param 对lastUpdateDate进行赋值
     */
    public void setLastUpdateDate(Date lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }
    
    /**
     * @return 返回 createDate
     */
    public Date getCreateDate() {
        return createDate;
    }
    
    /**
     * @param 对createDate进行赋值
     */
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
    
    /**
     * @return 返回 size
     */
    public long getSize() {
        return size;
    }
    
    /**
     * @param 对size进行赋值
     */
    public void setSize(long size) {
        this.size = size;
    }
    
    /**
     * @return 返回 tags
     */
    public List<AttachmentTag> getTags() {
        return tags;
    }
    
    /**
     * @param 对tags进行赋值
     */
    public void setTags(List<AttachmentTag> tags) {
        this.tags = tags;
    }
}
